// =============================================================================
//                                  Rand class
// =============================================================================

import java.util.Random;

public class Rand {

// -----------------------------------------------------------------------------
// variables
// -----------------------------------------------------------------------------

	protected static Random r=new Random();

// -----------------------------------------------------------------------------
// INT():  Return random integer
// -----------------------------------------------------------------------------

	public static int  INT()                    { return Math.abs(r.nextInt());  }
	public static int  INT(int max)             { return INT()%max;              }
	public static int  INT(int low,int high)    { return INT()%(high-low)+low;   }

// -----------------------------------------------------------------------------
// LONG():  Return random long
// -----------------------------------------------------------------------------

	public static long LONG()                   { return Math.abs(r.nextLong()); }
	public static long LONG(long max)           { return LONG()%max;             }
	public static long LONG(long low,long high) { return LONG()%(high-low)+low;  }

}